#ifndef INIT_H
#define INIT_H
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <string.h>
#include <QStringList>
#include<QFile>
#include <QTextStream>
extern int MaxBuffer;

const int MAX_NAME = 40;       //姓名长度
const int  MAX_ID = 20;        //学号长度
//const int  MAX_CODE = 20;     //密码长度(规定下)
const int MAX_PWDHASH = 40 + 1; //密码二次Hash值长度
const int MAX_PWDSALT = 5 + 1;  //密码盐字符串长度
const int MAX_MAJOR = 40;     //专业长度
const int MAX_BORROW = 3;     //最大可借书籍
const int MAX_RESERVE = 3;    //最大预约数量
const int MAX_STAR = 3;       //最大收藏数量
const int MAX_MESSAGEBODY = 20 * 2 + 1; //最大消息长度

const int MAX_BOOK_NAME = 100;   //书名长度
const int MAX_WRITER = 100;    //作者名字长度
const int MAX_ISBN = 20;         //出版号（区分是否是一种书）长度
const int MAX_PUBLISH = 50;    //出版社长度
const int MAX_TAG = 6;
const char studentDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\student.dat";   //定义student.dat路径
const char bookDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\book.dat";   //定义book.dat路径
const char menuDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\menu.dat";   //定义menu.dat路径
const char recordDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\record.dat";   //定义record.dat路径
const char heroRankDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\heroRank.dat";   //定义heroRank.dat路径
const char messageDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\message.dat";   //定义heroRank.dat路径
const char logPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\log.txt";


const char defaultUserDataCsvPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\user_data.csv";   //定义默认user_data.csv路径
const char majorDatPath[] = "C:\\Users\\dell\\Documents\\2021_news\\soft\\Library\\major.txt";

extern std::string admin_id;
extern std::string admin_password;


const int STUIDNUM = 11;     //学号长度
const int TEAIDNUM = 6;     //工号长度
const int ISBN = 13; //ISBN长度
const int BORROWING_TIME = 2592000;     //允许借阅时长（秒），默认1个月
const int REBORROWING_TIME = 1296000;   //允许续借时长（秒），默认半个月

const int heroRankRequireNum = 7;



#endif // INIT_H
